#pragma once

#ifndef __RPC_DC_CLIENT_H__
#define __RPC_DC_CLIENT_H__

#include "RpcClient.h"
#include "RpcWebClient.h"
#include "datacore_h.h"


class RpcClient;
class RpcWebClient;
class RpcDcClient;

class RpcDcClient: public RpcClient {

private:
    enum : long { eExtendSize = 0x60 };

private:
    std::string         m_strWebSvcEndpoint;
    bool                m_fIsSvcProtected;
    std::string         m_strCode;

public:
    RpcDcClient();
    RpcDcClient(__in std::string &svcAddress, __in std::string &webSvcEndpoint, __in std::string &dcSvcEndpoint);
    ~RpcDcClient();

public:
    virtual bool Connect();
    virtual void Disconnect();
    bool Configure(__in std::string &svcAddress, __in std::string &webSvcEndpoint, __in std::string &dcSvcEndpoint);
    bool ExecuteRequest(__in long ioctl, __in long sizeIn, __in byte *buffIn, __in long sizeOut, __out byte *buffOut, __out long *pResultOut);

protected:
    virtual bool _ConnectionProbe();
    virtual void _ConnectionPost();

public:
    bool InqIsSvcProtected();
    void InqCode(__out std::string &codeOut);

};

#endif